<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
StatUtils (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="StatUtils (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/StatUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/stat/Frequency.html" title="class in org.apache.commons.math3.stat"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/stat/StatUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StatUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.stat</FONT>
<BR>
Class StatUtils</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.stat.StatUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>StatUtils</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
StatUtils provides static methods for computing statistics based on data
 stored in double[] arrays.
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
  <DD>$Id: StatUtils.java 1416643 2012-12-03 19:37:14Z tn $</DD>
</DL>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#geometricMean(double[])">geometricMean</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the geometric mean of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#geometricMean(double[], int, int)">geometricMean</A></B>(double[]&nbsp;values,
              int&nbsp;begin,
              int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the geometric mean of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#max(double[])">max</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#max(double[], int, int)">max</A></B>(double[]&nbsp;values,
    int&nbsp;begin,
    int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#mean(double[])">mean</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the arithmetic mean of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#mean(double[], int, int)">mean</A></B>(double[]&nbsp;values,
     int&nbsp;begin,
     int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the arithmetic mean of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#meanDifference(double[], double[])">meanDifference</A></B>(double[]&nbsp;sample1,
               double[]&nbsp;sample2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the mean of the (signed) differences between corresponding elements of the
 input arrays -- i.e., sum(sample1[i] - sample2[i]) / sample1.length.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#min(double[])">min</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the minimum of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#min(double[], int, int)">min</A></B>(double[]&nbsp;values,
    int&nbsp;begin,
    int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the minimum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#normalize(double[])">normalize</A></B>(double[]&nbsp;sample)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normalize (standardize) the sample, so it is has a mean of 0 and a standard deviation of 1.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#percentile(double[], double)">percentile</A></B>(double[]&nbsp;values,
           double&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#percentile(double[], int, int, double)">percentile</A></B>(double[]&nbsp;values,
           int&nbsp;begin,
           int&nbsp;length,
           double&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array, starting with the element in (0-based)
 position <code>begin</code> in the array and including <code>length</code>
 values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[])">populationVariance</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], double)">populationVariance</A></B>(double[]&nbsp;values,
                   double&nbsp;mean)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the input array, using the
 precomputed mean value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], double, int, int)">populationVariance</A></B>(double[]&nbsp;values,
                   double&nbsp;mean,
                   int&nbsp;begin,
                   int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the specified portion of
 the input array, using the precomputed mean value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], int, int)">populationVariance</A></B>(double[]&nbsp;values,
                   int&nbsp;begin,
                   int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#product(double[])">product</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the product of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#product(double[], int, int)">product</A></B>(double[]&nbsp;values,
        int&nbsp;begin,
        int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the product of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sum(double[])">sum</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the values in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sum(double[], int, int)">sum</A></B>(double[]&nbsp;values,
    int&nbsp;begin,
    int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sumDifference(double[], double[])">sumDifference</A></B>(double[]&nbsp;sample1,
              double[]&nbsp;sample2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the (signed) differences between corresponding elements of the
 input arrays -- i.e., sum(sample1[i] - sample2[i]).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sumLog(double[])">sumLog</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the natural logs of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sumLog(double[], int, int)">sumLog</A></B>(double[]&nbsp;values,
       int&nbsp;begin,
       int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the natural logs of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sumSq(double[])">sumSq</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the squares of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#sumSq(double[], int, int)">sumSq</A></B>(double[]&nbsp;values,
      int&nbsp;begin,
      int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the squares of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#variance(double[])">variance</A></B>(double[]&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the variance of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#variance(double[], double)">variance</A></B>(double[]&nbsp;values,
         double&nbsp;mean)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the variance of the entries in the input array, using the
 precomputed mean value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#variance(double[], double, int, int)">variance</A></B>(double[]&nbsp;values,
         double&nbsp;mean,
         int&nbsp;begin,
         int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the variance of the entries in the specified portion of
 the input array, using the precomputed mean value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#variance(double[], int, int)">variance</A></B>(double[]&nbsp;values,
         int&nbsp;begin,
         int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the variance of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#varianceDifference(double[], double[], double)">varianceDifference</A></B>(double[]&nbsp;sample1,
                   double[]&nbsp;sample2,
                   double&nbsp;meanDifference)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the variance of the (signed) differences between corresponding elements of the
 input arrays -- i.e., var(sample1[i] - sample2[i]).</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="sum(double[])"><!-- --></A><H3>
sum</H3>
<PRE>
public static double <B>sum</B>(double[]&nbsp;values)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the values in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the input array
 is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - array of values to sum
<DT><B>Returns:</B><DD>the sum of the values or <code>Double.NaN</code> if the array
 is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="sum(double[], int, int)"><!-- --></A><H3>
sum</H3>
<PRE>
public static double <B>sum</B>(double[]&nbsp;values,
                         int&nbsp;begin,
                         int&nbsp;length)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the sum of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
  parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="sumSq(double[])"><!-- --></A><H3>
sumSq</H3>
<PRE>
public static double <B>sumSq</B>(double[]&nbsp;values)
                    throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the squares of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - input array
<DT><B>Returns:</B><DD>the sum of the squared values or <code>Double.NaN</code> if the
 array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="sumSq(double[], int, int)"><!-- --></A><H3>
sumSq</H3>
<PRE>
public static double <B>sumSq</B>(double[]&nbsp;values,
                           int&nbsp;begin,
                           int&nbsp;length)
                    throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the squares of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the sum of the squares of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="product(double[])"><!-- --></A><H3>
product</H3>
<PRE>
public static double <B>product</B>(double[]&nbsp;values)
                      throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the product of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the product of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="product(double[], int, int)"><!-- --></A><H3>
product</H3>
<PRE>
public static double <B>product</B>(double[]&nbsp;values,
                             int&nbsp;begin,
                             int&nbsp;length)
                      throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the product of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the product of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="sumLog(double[])"><!-- --></A><H3>
sumLog</H3>
<PRE>
public static double <B>sumLog</B>(double[]&nbsp;values)
                     throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the natural logs of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/summary/SumOfLogs.html" title="class in org.apache.commons.math3.stat.descriptive.summary"><CODE>SumOfLogs</CODE></A>.
 </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the sum of the natural logs of the values or Double.NaN if
 the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="sumLog(double[], int, int)"><!-- --></A><H3>
sumLog</H3>
<PRE>
public static double <B>sumLog</B>(double[]&nbsp;values,
                            int&nbsp;begin,
                            int&nbsp;length)
                     throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the sum of the natural logs of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/summary/SumOfLogs.html" title="class in org.apache.commons.math3.stat.descriptive.summary"><CODE>SumOfLogs</CODE></A>.
 </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the sum of the natural logs of the values or Double.NaN if
 length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="mean(double[])"><!-- --></A><H3>
mean</H3>
<PRE>
public static double <B>mean</B>(double[]&nbsp;values)
                   throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the arithmetic mean of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Mean.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Mean</CODE></A> for
 details on the computing algorithm.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the mean of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="mean(double[], int, int)"><!-- --></A><H3>
mean</H3>
<PRE>
public static double <B>mean</B>(double[]&nbsp;values,
                          int&nbsp;begin,
                          int&nbsp;length)
                   throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the arithmetic mean of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Mean.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Mean</CODE></A> for
 details on the computing algorithm.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the mean of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="geometricMean(double[])"><!-- --></A><H3>
geometricMean</H3>
<PRE>
public static double <B>geometricMean</B>(double[]&nbsp;values)
                            throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the geometric mean of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/GeometricMean.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>GeometricMean</CODE></A>
 for details on the computing algorithm.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the geometric mean of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="geometricMean(double[], int, int)"><!-- --></A><H3>
geometricMean</H3>
<PRE>
public static double <B>geometricMean</B>(double[]&nbsp;values,
                                   int&nbsp;begin,
                                   int&nbsp;length)
                            throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the geometric mean of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>IllegalArgumentException</code> if the array is null.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/GeometricMean.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>GeometricMean</CODE></A>
 for details on the computing algorithm.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the geometric mean of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="variance(double[])"><!-- --></A><H3>
variance</H3>
<PRE>
public static double <B>variance</B>(double[]&nbsp;values)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the variance of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.

 <p>This method returns the bias-corrected sample variance (using <code>n - 1</code> in
 the denominator).  Use <A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[])"><CODE>populationVariance(double[])</CODE></A> for the non-bias-corrected
 population variance.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the variance of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="variance(double[], int, int)"><!-- --></A><H3>
variance</H3>
<PRE>
public static double <B>variance</B>(double[]&nbsp;values,
                              int&nbsp;begin,
                              int&nbsp;length)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the variance of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.

 <p>This method returns the bias-corrected sample variance (using <code>n - 1</code> in
 the denominator).  Use <A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], int, int)"><CODE>populationVariance(double[], int, int)</CODE></A> for the non-bias-corrected
 population variance.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or the
 array index parameters are not valid.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the variance of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
  parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="variance(double[], double, int, int)"><!-- --></A><H3>
variance</H3>
<PRE>
public static double <B>variance</B>(double[]&nbsp;values,
                              double&nbsp;mean,
                              int&nbsp;begin,
                              int&nbsp;length)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the variance of the entries in the specified portion of
 the input array, using the precomputed mean value.  Returns
 <code>Double.NaN</code> if the designated subarray is empty.

 <p>This method returns the bias-corrected sample variance (using <code>n - 1</code> in
 the denominator).  Use <A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], double, int, int)"><CODE>populationVariance(double[], double, int, int)</CODE></A> for the non-bias-corrected
 population variance.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 The formula used assumes that the supplied mean value is the arithmetic
 mean of the sample data, not a known population parameter.  This method
 is supplied only to save computation when the mean has already been
 computed.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or the
 array index parameters are not valid.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>mean</CODE> - the precomputed mean value<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the variance of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
  parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="variance(double[], double)"><!-- --></A><H3>
variance</H3>
<PRE>
public static double <B>variance</B>(double[]&nbsp;values,
                              double&nbsp;mean)
                       throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the variance of the entries in the input array, using the
 precomputed mean value.  Returns <code>Double.NaN</code> if the array
 is empty.

 <p>This method returns the bias-corrected sample variance (using <code>n - 1</code> in
 the denominator).  Use <A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#populationVariance(double[], double)"><CODE>populationVariance(double[], double)</CODE></A> for the non-bias-corrected
 population variance.</p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 The formula used assumes that the supplied mean value is the arithmetic
 mean of the sample data, not a known population parameter.  This method
 is supplied only to save computation when the mean has already been
 computed.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>mean</CODE> - the precomputed mean value
<DT><B>Returns:</B><DD>the variance of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="populationVariance(double[])"><!-- --></A><H3>
populationVariance</H3>
<PRE>
public static double <B>populationVariance</B>(double[]&nbsp;values)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the formula and computing algorithm.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the population variance of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="populationVariance(double[], int, int)"><!-- --></A><H3>
populationVariance</H3>
<PRE>
public static double <B>populationVariance</B>(double[]&nbsp;values,
                                        int&nbsp;begin,
                                        int&nbsp;length)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or the
 array index parameters are not valid.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the population variance of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
  parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="populationVariance(double[], double, int, int)"><!-- --></A><H3>
populationVariance</H3>
<PRE>
public static double <B>populationVariance</B>(double[]&nbsp;values,
                                        double&nbsp;mean,
                                        int&nbsp;begin,
                                        int&nbsp;length)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the specified portion of
 the input array, using the precomputed mean value.  Returns
 <code>Double.NaN</code> if the designated subarray is empty.
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 The formula used assumes that the supplied mean value is the arithmetic
 mean of the sample data, not a known population parameter.  This method
 is supplied only to save computation when the mean has already been
 computed.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or the
 array index parameters are not valid.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>mean</CODE> - the precomputed mean value<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the population variance of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
  parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="populationVariance(double[], double)"><!-- --></A><H3>
populationVariance</H3>
<PRE>
public static double <B>populationVariance</B>(double[]&nbsp;values,
                                        double&nbsp;mean)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
 population variance</a> of the entries in the input array, using the
 precomputed mean value.  Returns <code>Double.NaN</code> if the array
 is empty.
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/moment/Variance.html" title="class in org.apache.commons.math3.stat.descriptive.moment"><CODE>Variance</CODE></A> for
 details on the computing algorithm.</p>
 <p>
 The formula used assumes that the supplied mean value is the arithmetic
 mean of the sample data, not a known population parameter.  This method
 is supplied only to save computation when the mean has already been
 computed.</p>
 <p>
 Returns 0 for a single-value (i.e. length = 1) sample.</p>
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>mean</CODE> - the precomputed mean value
<DT><B>Returns:</B><DD>the population variance of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="max(double[])"><!-- --></A><H3>
max</H3>
<PRE>
public static double <B>max</B>(double[]&nbsp;values)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the maximum of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
 <p>
 <ul>
 <li>The result is <code>NaN</code> iff all values are <code>NaN</code>
 (i.e. <code>NaN</code> values have no impact on the value of the statistic).</li>
 <li>If any of the values equals <code>Double.POSITIVE_INFINITY</code>,
 the result is <code>Double.POSITIVE_INFINITY.</code></li>
 </ul></p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the maximum of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="max(double[], int, int)"><!-- --></A><H3>
max</H3>
<PRE>
public static double <B>max</B>(double[]&nbsp;values,
                         int&nbsp;begin,
                         int&nbsp;length)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the maximum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or
 the array index parameters are not valid.</p>
 <p>
 <ul>
 <li>The result is <code>NaN</code> iff all values are <code>NaN</code>
 (i.e. <code>NaN</code> values have no impact on the value of the statistic).</li>
 <li>If any of the values equals <code>Double.POSITIVE_INFINITY</code>,
 the result is <code>Double.POSITIVE_INFINITY.</code></li>
 </ul></p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the maximum of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="min(double[])"><!-- --></A><H3>
min</H3>
<PRE>
public static double <B>min</B>(double[]&nbsp;values)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the minimum of the entries in the input array, or
 <code>Double.NaN</code> if the array is empty.
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
 <p>
 <ul>
 <li>The result is <code>NaN</code> iff all values are <code>NaN</code>
 (i.e. <code>NaN</code> values have no impact on the value of the statistic).</li>
 <li>If any of the values equals <code>Double.NEGATIVE_INFINITY</code>,
 the result is <code>Double.NEGATIVE_INFINITY.</code></li>
 </ul> </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array
<DT><B>Returns:</B><DD>the minimum of the values or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null</DL>
</DD>
</DL>
<HR>

<A NAME="min(double[], int, int)"><!-- --></A><H3>
min</H3>
<PRE>
public static double <B>min</B>(double[]&nbsp;values,
                         int&nbsp;begin,
                         int&nbsp;length)
                  throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns the minimum of the entries in the specified portion of
 the input array, or <code>Double.NaN</code> if the designated subarray
 is empty.
 <p>
 Throws <code>MathIllegalArgumentException</code> if the array is null or
 the array index parameters are not valid.</p>
 <p>
 <ul>
 <li>The result is <code>NaN</code> iff all values are <code>NaN</code>
 (i.e. <code>NaN</code> values have no impact on the value of the statistic).</li>
 <li>If any of the values equals <code>Double.NEGATIVE_INFINITY</code>,
 the result is <code>Double.NEGATIVE_INFINITY.</code></li>
 </ul></p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the input array<DD><CODE>begin</CODE> - index of the first array element to include<DD><CODE>length</CODE> - the number of elements to include
<DT><B>Returns:</B><DD>the minimum of the values or Double.NaN if length = 0
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array is null or the array index
 parameters are not valid</DL>
</DD>
</DL>
<HR>

<A NAME="percentile(double[], double)"><!-- --></A><H3>
percentile</H3>
<PRE>
public static double <B>percentile</B>(double[]&nbsp;values,
                                double&nbsp;p)
                         throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array.
 <p>
 <ul>
 <li>Returns <code>Double.NaN</code> if <code>values</code> has length
 <code>0</code></li></p>
 <li>Returns (for any value of <code>p</code>) <code>values[0]</code>
  if <code>values</code> has length <code>1</code></li>
 <li>Throws <code>IllegalArgumentException</code> if <code>values</code>
 is null  or p is not a valid quantile value (p must be greater than 0
 and less than or equal to 100)</li>
 </ul></p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><CODE>Percentile</CODE></A> for
 a description of the percentile estimation algorithm used.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - input array of values<DD><CODE>p</CODE> - the percentile value to compute
<DT><B>Returns:</B><DD>the percentile value or Double.NaN if the array is empty
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if <code>values</code> is null
 or p is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="percentile(double[], int, int, double)"><!-- --></A><H3>
percentile</H3>
<PRE>
public static double <B>percentile</B>(double[]&nbsp;values,
                                int&nbsp;begin,
                                int&nbsp;length,
                                double&nbsp;p)
                         throws <A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></PRE>
<DL>
<DD>Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array, starting with the element in (0-based)
 position <code>begin</code> in the array and including <code>length</code>
 values.
 <p>
 <ul>
 <li>Returns <code>Double.NaN</code> if <code>length = 0</code></li>
 <li>Returns (for any value of <code>p</code>) <code>values[begin]</code>
  if <code>length = 1 </code></li>
 <li>Throws <code>MathIllegalArgumentException</code> if <code>values</code>
  is null , <code>begin</code> or <code>length</code> is invalid, or
 <code>p</code> is not a valid quantile value (p must be greater than 0
 and less than or equal to 100)</li>
 </ul></p>
 <p>
 See <A HREF="../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><CODE>Percentile</CODE></A> for
 a description of the percentile estimation algorithm used.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - array of input values<DD><CODE>p</CODE> - the percentile to compute<DD><CODE>begin</CODE> - the first (0-based) element to include in the computation<DD><CODE>length</CODE> - the number of array elements to include
<DT><B>Returns:</B><DD>the percentile value
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the parameters are not valid or the
 input array is null</DL>
</DD>
</DL>
<HR>

<A NAME="sumDifference(double[], double[])"><!-- --></A><H3>
sumDifference</H3>
<PRE>
public static double <B>sumDifference</B>(double[]&nbsp;sample1,
                                   double[]&nbsp;sample2)
                            throws <A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A>,
                                   <A HREF="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Returns the sum of the (signed) differences between corresponding elements of the
 input arrays -- i.e., sum(sample1[i] - sample2[i]).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sample1</CODE> - the first array<DD><CODE>sample2</CODE> - the second array
<DT><B>Returns:</B><DD>sum of paired differences
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if the arrays do not have the same
 (positive) length.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if the sample arrays are empty.</DL>
</DD>
</DL>
<HR>

<A NAME="meanDifference(double[], double[])"><!-- --></A><H3>
meanDifference</H3>
<PRE>
public static double <B>meanDifference</B>(double[]&nbsp;sample1,
                                    double[]&nbsp;sample2)
                             throws <A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A>,
                                    <A HREF="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Returns the mean of the (signed) differences between corresponding elements of the
 input arrays -- i.e., sum(sample1[i] - sample2[i]) / sample1.length.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sample1</CODE> - the first array<DD><CODE>sample2</CODE> - the second array
<DT><B>Returns:</B><DD>mean of paired differences
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if the arrays do not have the same
 (positive) length.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if the sample arrays are empty.</DL>
</DD>
</DL>
<HR>

<A NAME="varianceDifference(double[], double[], double)"><!-- --></A><H3>
varianceDifference</H3>
<PRE>
public static double <B>varianceDifference</B>(double[]&nbsp;sample1,
                                        double[]&nbsp;sample2,
                                        double&nbsp;meanDifference)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A>,
                                        <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></PRE>
<DL>
<DD>Returns the variance of the (signed) differences between corresponding elements of the
 input arrays -- i.e., var(sample1[i] - sample2[i]).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sample1</CODE> - the first array<DD><CODE>sample2</CODE> - the second array<DD><CODE>meanDifference</CODE> - the mean difference between corresponding entries
<DT><B>Returns:</B><DD>variance of paired differences
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if the arrays do not have the same
 length.
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</A></CODE> - if the arrays length is less than 2.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/math3/stat/StatUtils.html#meanDifference(double[], double[])"><CODE>meanDifference(double[],double[])</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="normalize(double[])"><!-- --></A><H3>
normalize</H3>
<PRE>
public static double[] <B>normalize</B>(double[]&nbsp;sample)</PRE>
<DL>
<DD>Normalize (standardize) the sample, so it is has a mean of 0 and a standard deviation of 1.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sample</CODE> - Sample to normalize.
<DT><B>Returns:</B><DD>normalized (standardized) sample.<DT><B>Since:</B></DT>
  <DD>2.2</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/StatUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/commons/math3/stat/Frequency.html" title="class in org.apache.commons.math3.stat"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/stat/StatUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StatUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
